package com.google.code.jskills.dal.entities;

// Generated 25.06.2013 17:52:09 by Hibernate Tools 3.6.0

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * CompetencesEntity generated by hbm2java
 */
@Entity
@Table(name = "COMPETENCES", schema = "PUBLIC", catalog = "PUBLIC")
public class CompetencesEntity implements java.io.Serializable {

	private Integer id;
	private CompetencesEntity competencesEntity;
	private String description;
	private Set<CompetencesEntity> competencesEntities = new HashSet<CompetencesEntity>(
			0);
	private Set<LevelEntity> levelEntities = new HashSet<LevelEntity>(0);

	public CompetencesEntity() {
	}

	public CompetencesEntity(String description) {
		this.description = description;
	}

	public CompetencesEntity(CompetencesEntity competencesEntity,
			String description, Set<CompetencesEntity> competencesEntities,
			Set<LevelEntity> levelEntities) {
		this.competencesEntity = competencesEntity;
		this.description = description;
		this.competencesEntities = competencesEntities;
		this.levelEntities = levelEntities;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARENT_ID")
	public CompetencesEntity getCompetencesEntity() {
		return this.competencesEntity;
	}

	public void setCompetencesEntity(CompetencesEntity competencesEntity) {
		this.competencesEntity = competencesEntity;
	}

	@Column(name = "DESCRIPTION", nullable = false, length = 256)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "competencesEntity")
	public Set<CompetencesEntity> getCompetencesEntities() {
		return this.competencesEntities;
	}

	public void setCompetencesEntities(
			Set<CompetencesEntity> competencesEntities) {
		this.competencesEntities = competencesEntities;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "competencesEntity")
	public Set<LevelEntity> getLevelEntities() {
		return this.levelEntities;
	}

	public void setLevelEntities(Set<LevelEntity> levelEntities) {
		this.levelEntities = levelEntities;
	}

}
